//
//  BussinessModel.h
//  OneCard
//
//  Created by sally on 16/2/17.
//  Copyright © 2016年 koalac. All rights reserved.
//


#import <Foundation/Foundation.h>
#import "JSONModel.h"

#define SUCCESS_RESULT   0

@interface BussinessModel : JSONModel

- (instancetype)initWithJsonObject:(id)jsonObject;

+ (void)setLastError:(NSError *)error;
+ (NSError *)getLastError;
+ (void)cleanLastError;

- (void)setLastError:(NSError *)error;
- (NSError *)getLastError;
- (void)cleanLastError;

// 通过对象返回一个NSDictionary，键是属性名称，值是属性值。
+ (NSDictionary *)getObjectData:(id)obj;

// 替换url的域名
+ (NSString *)replaceUrlDomain:(NSString *)urlStr;

+ (UIImageView *)getImageForView:(UIImageView *)imageView andImageURL:(NSString *)url;

// 把格式化的JSON格式的字符串转换成字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

@end
